﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Friday13
{
    class Program
    {
        static void CountFriday13()
        {
            DateTime StartDt = DateTime.Parse("2000/1/1");
            DateTime EndDt = DateTime.Parse("3000/1/1");
            TimeSpan years = EndDt.Subtract(StartDt);
            int CounterMax = 0, CounterTemp = 0;
            string str="";
            for (int i = 0; i < years.TotalDays; i++)
            {
                if ((StartDt.Day == 13) && (StartDt.DayOfWeek.ToString() == "Friday"))
                {
                    CounterTemp++;
                }
                if ((StartDt.DayOfYear == 365) || (StartDt.DayOfYear == 366))
                {
                    if (CounterTemp > CounterMax)
                    {
                        CounterMax = CounterTemp;
                        str = StartDt.Year.ToString();
                        CounterTemp = 0;
                    }
                    else {
                        CounterTemp = 0;
                    }
                }
                StartDt = StartDt.AddDays(1);
            }
            Console.WriteLine(CounterMax + " " + str);
        }

        static void Main(string[] args)
        {
            CountFriday13();
        }
    }
}
